package com.zxp.common.codegen.controller;

import com.zxp.common.api.R;
import com.zxp.common.codegen.constant.DbType;
import com.zxp.common.codegen.pojo.DataBase;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @desc:
 * @author: shollin
 * @date: 2021/6/17/017 15:54
 */
@RestController
public class GenController {

    @RequestMapping("/codegen")
    public R<String> codegen(String host, String username, String password, String dbname, String tables, String tablePrefix, String outpath){
        DataBase dataBase = new DataBase(DbType.MYSQL, host, dbname);
        dataBase.setUsername(username);
        dataBase.setPassword(password);

        return R.success("生成成功");
    }

}
